package com.ruoyi.fengkong.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.fengkong.entity.TFkBusinessCreditSub;
import com.ruoyi.fengkong.mapper.TFkBusinessCreditSubMapper;
import com.ruoyi.fengkong.service.ITFkBusinessCreditSubService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 风控公寓授信子Service业务层处理
 * 
 * @author wish
 * @date 2021-06-19
 */
@Service
public class TFkBusinessCreditSubServiceImpl implements ITFkBusinessCreditSubService
{
    @Autowired
    private TFkBusinessCreditSubMapper tFkBusinessCreditSubMapper;

    /**
     * 查询风控公寓授信子
     * 
     * @param id 风控公寓授信子ID
     * @return 风控公寓授信子
     */
    @Override
    public TFkBusinessCreditSub selectTFkBusinessCreditSubById(Long id)
    {
        return tFkBusinessCreditSubMapper.selectTFkBusinessCreditSubById(id);
    }

    /**
     * 查询风控公寓授信子列表
     * 
     * @param tFkBusinessCreditSub 风控公寓授信子
     * @return 风控公寓授信子
     */
    @Override
    public List<TFkBusinessCreditSub> selectTFkBusinessCreditSubList(TFkBusinessCreditSub tFkBusinessCreditSub)
    {
        return tFkBusinessCreditSubMapper.selectTFkBusinessCreditSubList(tFkBusinessCreditSub);
    }

    /**
     * 新增风控公寓授信子
     * 
     * @param tFkBusinessCreditSub 风控公寓授信子
     * @return 结果
     */
    @Override
    public int insertTFkBusinessCreditSub(TFkBusinessCreditSub tFkBusinessCreditSub)
    {
        tFkBusinessCreditSub.setCreateTime(DateUtils.getNowDate());
        return tFkBusinessCreditSubMapper.insertTFkBusinessCreditSub(tFkBusinessCreditSub);
    }

    /**
     * 修改风控公寓授信子
     * 
     * @param tFkBusinessCreditSub 风控公寓授信子
     * @return 结果
     */
    @Override
    public int updateTFkBusinessCreditSub(TFkBusinessCreditSub tFkBusinessCreditSub)
    {
        tFkBusinessCreditSub.setUpdateTime(DateUtils.getNowDate());
        return tFkBusinessCreditSubMapper.updateTFkBusinessCreditSub(tFkBusinessCreditSub);
    }

    /**
     * 批量删除风控公寓授信子
     * 
     * @param ids 需要删除的风控公寓授信子ID
     * @return 结果
     */
    @Override
    public int deleteTFkBusinessCreditSubByIds(Long[] ids)
    {
        return tFkBusinessCreditSubMapper.deleteTFkBusinessCreditSubByIds(ids);
    }

    /**
     * 删除风控公寓授信子信息
     * 
     * @param id 风控公寓授信子ID
     * @return 结果
     */
    @Override
    public int deleteTFkBusinessCreditSubById(Long id)
    {
        return tFkBusinessCreditSubMapper.deleteTFkBusinessCreditSubById(id);
    }
}
